package vo

// Body 响应
type Body struct {
	Code uint64      `json:"code"`
	Msg  interface{} `json:"msg"`
	Data interface{} `json:"data"`
}

func New() Body {
	return Body{
		Code: 0,
		Msg:  "success",
	}
}

func NewFail() Body {
	return Body{
		Code: 1,
		Msg:  "fail",
	}
}

func NewTokenInvalid() Body {
	return Body{
		Code: 2,
		Msg:  "tokenInvalid",
	}
}

// Page 分页请求响应结构
type Page struct {
	PageNo   int64       `json:"pageNo"`
	PageSize int64       `json:"pageSize"`
	Total    int64       `json:"total"`
	Data     interface{} `json:"data"`
}
